\section{Tools.AspxToHtml类参考}
\label{class_tools_1_1_aspx_to_html}\index{Tools::AspxToHtml@{Tools::AspxToHtml}}


\doxyref{AspxToHtml}{p.}{class_tools_1_1_aspx_to_html} 的摘要说明。 注:使用此类,你可以在web.config文件对模板类进行配置.如下 /$\ast$$<$appSettings$>$ $<$add key=\char`\"{}templateFilePath\char`\"{} value=\char`\"{}htmlmoudel.htm\char`\"{}$>$ $<$add key=\char`\"{}htmlFilePath\char`\"{} value=\char`\"{}new/\char`\"{}$>$$<$/add$>$ $<$add key=\char`\"{}ErrLogPath\char`\"{} value=\char`\"{}aspxTohtml\_\-log.txt\char`\"{}$>$$<$/add$>$ $<$/appSettings$>$  


\subsection*{公有成员}
\begin{DoxyCompactItemize}
\item 
void {\bf setTemplateFileparameter} (string[$\,$] param)
\begin{DoxyCompactList}\small\item\em 为HTML页面参数数组付值 \item\end{DoxyCompactList}\item 
void {\bf setAspxFileparameter} (string[$\,$] param)
\begin{DoxyCompactList}\small\item\em 为aspx文件中将要替换html文件中的参数数组付值 \item\end{DoxyCompactList}\item 
string {\bf StartConvert} ()
\begin{DoxyCompactList}\small\item\em 开始进行aspxTohtml转换 \item\end{DoxyCompactList}\item 
string {\bf StartConvert} (string[$\,$] htmlparam, string[$\,$] aspxparam)
\begin{DoxyCompactList}\small\item\em 开始进行aspxTohtml转换 \item\end{DoxyCompactList}\item 
string {\bf getUrltoHtml} (string Url)
\begin{DoxyCompactList}\small\item\em 传入URL返回网页的html代码 \item\end{DoxyCompactList}\item 
{\bf AspxToHtml} (int templateParamCount)
\begin{DoxyCompactList}\small\item\em 提供欲代替的参数个数 \item\end{DoxyCompactList}\item 
{\bf AspxToHtml} (int templateParamCount, string htmlFilePath, string templateFilePath)
\end{DoxyCompactItemize}
\subsection*{属性}
\begin{DoxyCompactItemize}
\item 
int {\bf TemplateParamCount}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em 模板文件中要替代的参数个数 \item\end{DoxyCompactList}\item 
string {\bf TemplateFilePath}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em 模板文件所在的路径 \item\end{DoxyCompactList}\item 
string {\bf HtmlFilePath}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em 转换后的html文件所存放的路径 \item\end{DoxyCompactList}\item 
Encoding {\bf TemplateHtmlCode}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em html模板文件编码 \item\end{DoxyCompactList}\item 
Encoding {\bf Code}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em 编码 \item\end{DoxyCompactList}\item 
string {\bf ErrLogPath}\hspace{0.3cm}{\ttfamily  [get, set]}
\begin{DoxyCompactList}\small\item\em 错误文件所在路径 \item\end{DoxyCompactList}\item 
string {\bf HtmlFileVirtualPath}\hspace{0.3cm}{\ttfamily  [get]}
\begin{DoxyCompactList}\small\item\em 获取转换后的html文件所在相对文件路径 如：如果HtmlFilePath=\char`\"{}/news/\char`\"{} 转换后的html文件名为200505050505.html 则返回的值为/news/200505050505.html \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
\doxyref{AspxToHtml}{p.}{class_tools_1_1_aspx_to_html} 的摘要说明。 注:使用此类,你可以在web.config文件对模板类进行配置.如下 /$\ast$$<$appSettings$>$ $<$add key=\char`\"{}templateFilePath\char`\"{} value=\char`\"{}htmlmoudel.htm\char`\"{}$>$ $<$add key=\char`\"{}htmlFilePath\char`\"{} value=\char`\"{}new/\char`\"{}$>$$<$/add$>$ $<$add key=\char`\"{}ErrLogPath\char`\"{} value=\char`\"{}aspxTohtml\_\-log.txt\char`\"{}$>$$<$/add$>$ $<$/appSettings$>$ 

\subsection{构造及析构函数文档}
\index{Tools::AspxToHtml@{Tools::AspxToHtml}!AspxToHtml@{AspxToHtml}}
\index{AspxToHtml@{AspxToHtml}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{AspxToHtml}]{\setlength{\rightskip}{0pt plus 5cm}Tools.AspxToHtml.AspxToHtml (
\begin{DoxyParamCaption}
\item[{int}]{ templateParamCount}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_abac0ffe161ddea8ca594e0dc719b8d5b}


提供欲代替的参数个数 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!AspxToHtml@{AspxToHtml}}
\index{AspxToHtml@{AspxToHtml}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{AspxToHtml}]{\setlength{\rightskip}{0pt plus 5cm}Tools.AspxToHtml.AspxToHtml (
\begin{DoxyParamCaption}
\item[{int}]{ templateParamCount, }
\item[{string}]{ htmlFilePath, }
\item[{string}]{ templateFilePath}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_ae59ad0bc10c998bdd543c5c5e08cd616}
html模板页中的参数个数

生成的html文件所存放的文件夹路径

html模板页路径

\subsection{成员函数文档}
\index{Tools::AspxToHtml@{Tools::AspxToHtml}!getUrltoHtml@{getUrltoHtml}}
\index{getUrltoHtml@{getUrltoHtml}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{getUrltoHtml}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.getUrltoHtml (
\begin{DoxyParamCaption}
\item[{string}]{ Url}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_a53757524c3e8d41fd9140573d49bf639}


传入URL返回网页的html代码 

URL

\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\index{Tools::AspxToHtml@{Tools::AspxToHtml}!setAspxFileparameter@{setAspxFileparameter}}
\index{setAspxFileparameter@{setAspxFileparameter}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{setAspxFileparameter}]{\setlength{\rightskip}{0pt plus 5cm}void Tools.AspxToHtml.setAspxFileparameter (
\begin{DoxyParamCaption}
\item[{string[$\,$]}]{ param}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_a970fb0290c06447eb5073af8c7d72769}


为aspx文件中将要替换html文件中的参数数组付值 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!setTemplateFileparameter@{setTemplateFileparameter}}
\index{setTemplateFileparameter@{setTemplateFileparameter}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{setTemplateFileparameter}]{\setlength{\rightskip}{0pt plus 5cm}void Tools.AspxToHtml.setTemplateFileparameter (
\begin{DoxyParamCaption}
\item[{string[$\,$]}]{ param}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_a8b12bdf18760ef56fb5210bc7ca037e0}


为HTML页面参数数组付值 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!StartConvert@{StartConvert}}
\index{StartConvert@{StartConvert}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{StartConvert}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.StartConvert (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_a002093e12b6b6b240f428a533ba8d571}


开始进行aspxTohtml转换 

\begin{DoxyReturn}{返回}
返回值为成功创建后的文件名称
\end{DoxyReturn}
在调用此方法之前必需确定已调用setTemplateFileparameter 和setAspxFileparameter方法进行相应的付值操作 \index{Tools::AspxToHtml@{Tools::AspxToHtml}!StartConvert@{StartConvert}}
\index{StartConvert@{StartConvert}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{StartConvert}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.StartConvert (
\begin{DoxyParamCaption}
\item[{string[$\,$]}]{ htmlparam, }
\item[{string[$\,$]}]{ aspxparam}
\end{DoxyParamCaption}
)}\label{class_tools_1_1_aspx_to_html_aaa641548dea0a1b07ee2667199c7524d}


开始进行aspxTohtml转换 

html模板页中的所有参数数组

aspx页面中要代替html模板页中参数值数组

\begin{DoxyReturn}{返回}
返回值为成功创建后的文件名称
\end{DoxyReturn}


\subsection{属性文档}
\index{Tools::AspxToHtml@{Tools::AspxToHtml}!Code@{Code}}
\index{Code@{Code}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{Code}]{\setlength{\rightskip}{0pt plus 5cm}Encoding Tools.AspxToHtml.Code\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a440a6869c08692ec75e451227f0b9479}


编码 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!ErrLogPath@{ErrLogPath}}
\index{ErrLogPath@{ErrLogPath}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{ErrLogPath}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.ErrLogPath\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a8d7963fca99f0fe6211bb74330427d4c}


错误文件所在路径 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!HtmlFilePath@{HtmlFilePath}}
\index{HtmlFilePath@{HtmlFilePath}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{HtmlFilePath}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.HtmlFilePath\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a36ccfd1504ec51ed043536dc3668d416}


转换后的html文件所存放的路径 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!HtmlFileVirtualPath@{HtmlFileVirtualPath}}
\index{HtmlFileVirtualPath@{HtmlFileVirtualPath}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{HtmlFileVirtualPath}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.HtmlFileVirtualPath\hspace{0.3cm}{\ttfamily  [get]}}\label{class_tools_1_1_aspx_to_html_a19915ff7d8fea978297fd18360889e9f}


获取转换后的html文件所在相对文件路径 如：如果HtmlFilePath=\char`\"{}/news/\char`\"{} 转换后的html文件名为200505050505.html 则返回的值为/news/200505050505.html 

如果在未调用StartConvert方法之前调用此属性则返回null \index{Tools::AspxToHtml@{Tools::AspxToHtml}!TemplateFilePath@{TemplateFilePath}}
\index{TemplateFilePath@{TemplateFilePath}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{TemplateFilePath}]{\setlength{\rightskip}{0pt plus 5cm}string Tools.AspxToHtml.TemplateFilePath\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a78b384e93a72e0dca4fe709b443670ba}


模板文件所在的路径 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!TemplateHtmlCode@{TemplateHtmlCode}}
\index{TemplateHtmlCode@{TemplateHtmlCode}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{TemplateHtmlCode}]{\setlength{\rightskip}{0pt plus 5cm}Encoding Tools.AspxToHtml.TemplateHtmlCode\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a38b7b621ab8d0f216e243c16b17641a4}


html模板文件编码 

\index{Tools::AspxToHtml@{Tools::AspxToHtml}!TemplateParamCount@{TemplateParamCount}}
\index{TemplateParamCount@{TemplateParamCount}!Tools::AspxToHtml@{Tools::AspxToHtml}}
\subsubsection[{TemplateParamCount}]{\setlength{\rightskip}{0pt plus 5cm}int Tools.AspxToHtml.TemplateParamCount\hspace{0.3cm}{\ttfamily  [get, set]}}\label{class_tools_1_1_aspx_to_html_a3da76856601f3e93b48aedf082a0512c}


模板文件中要替代的参数个数 



该类的文档由以下文件生成：\begin{DoxyCompactItemize}
\item 
D:/Project/1101/Tools/AspxToHtmlHelper.cs\end{DoxyCompactItemize}
